import request from '@/axios'

export const getUserListApi = (params) => {
  return request.get({ url: '/system/user/list', params })
}

export const saveTableApi = (data: any) => {
  return request.post({ url: '/system/user/create', data })
}

export const updateTableApi = (data: any) => {
  return request.post({ url: '/system/user/edit', data })
}

export const deleteUserApi = (userId: string) => {
  return request.post({ url: '/system/user/delete', params: { userId } })
}

export const assignRoleApi = (data: any) => {
  return request.post({ url: '/system/user/assign-role', data })
}
